package oracle;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.Objects;

@Data
@TableName("PICTURE_CT")
public class PictureCt implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * cid
     */
    @TableId("CID")
    private String cid;
    /**
     * 车号
     */
    @TableField("CH")
    private String ch;
    /**
     * 日期
     */
    @TableField("RQ")
    private Date rq;
    /**
     * 单位
     */
    @TableField("DWDM")
    private String dwdm;
    /**
     * 部位
     */
    @TableField("BW")
    private String bw;
    /**
     * 图片二进制
     */
    @TableField("ZP")
    private byte[] zp;
    /**
     * id
     */
    @TableField("ID")
    private String id;

    public PictureCt(String cid, String ch, Date rq, String dwdm, String bw, byte[] zp, String id) {
        this.cid = cid;
        this.ch = ch;
        this.rq = rq;
        this.dwdm = dwdm;
        this.bw = bw;
        this.zp = zp;
        this.id = id;
    }

    public PictureCt() {
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public String getCid() {
        return cid;
    }

    public void setCid(String cid) {
        this.cid = cid;
    }

    public String getCh() {
        return ch;
    }

    public void setCh(String ch) {
        this.ch = ch;
    }

    public Date getRq() {
        return rq;
    }

    public void setRq(Date rq) {
        this.rq = rq;
    }

    public String getDwdm() {
        return dwdm;
    }

    public void setDwdm(String dwdm) {
        this.dwdm = dwdm;
    }

    public String getBw() {
        return bw;
    }

    public void setBw(String bw) {
        this.bw = bw;
    }

    public byte[] getZp() {
        return zp;
    }

    public void setZp(byte[] zp) {
        this.zp = zp;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PictureCt)) return false;
        PictureCt pictureCt = (PictureCt) o;
        return Objects.equals(getCid(), pictureCt.getCid()) && Objects.equals(getCh(), pictureCt.getCh()) && Objects.equals(getRq(), pictureCt.getRq()) && Objects.equals(getDwdm(), pictureCt.getDwdm()) && Objects.equals(getBw(), pictureCt.getBw()) && Arrays.equals(getZp(), pictureCt.getZp()) && Objects.equals(getId(), pictureCt.getId());
    }

    @Override
    public int hashCode() {
        int result = Objects.hash(getCid(), getCh(), getRq(), getDwdm(), getBw(), getId());
        result = 31 * result + Arrays.hashCode(getZp());
        return result;
    }

    @Override
    public String toString() {
        return "PictureCt{" +
                "cid='" + cid + '\'' +
                ", ch='" + ch + '\'' +
                ", rq=" + rq +
                ", dwdm='" + dwdm + '\'' +
                ", bw='" + bw + '\'' +
                ", zp=" + Arrays.toString(zp) +
                ", id='" + id + '\'' +
                '}';
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        return super.clone();
    }


}
